﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RIDA.Globals;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;

namespace RIDA.Globals
{
    public class MefContainer : SingletonObject<MefContainer>
    {
        static CompositionContainer container;
        private MefContainer()
        {
            AggregateCatalog catalog = new AggregateCatalog();
            catalog.Catalogs.Add(new AssemblyCatalog(Assembly.LoadFrom("RIDA.Tasks.dll")));

            container = new CompositionContainer(catalog);
        }

        public CompositionContainer Container
        {
            get
            {
                return container;
            }
        }
    }
}
